﻿using System;
using System.Text;

using mfRCF.Core;
using System.Net;

namespace mfRCF.netmf
{
    public class mfHttpContext : mfIHttpContext
    {
        #region CTOR

        public mfHttpContext(HttpListenerContext context, mfIHttpAuthenticator authenticator) 
        {
            mfContext = context;
            Request = new mfHttpRequest(context.Request, authenticator);
            Response = new mfHttpResponse(context.Response);
        }
        #endregion

        #region Properties

        private HttpListenerContext mfContext
        { 
            get; 
            set;
        }

        #endregion

        public mfIHttpRequest Request
        {
            get;
            set;
        }

        public mfIHttpResponse Response
        {
            get;
            set;
        }

        #region mfIHttpContext


        public void Close()
        {
            mfContext.Close();
        }

        public void Reset()
        {
            mfContext.Reset();
        } 
        #endregion
    }
}
